import { defaul } from '@/api/table'

const state = {
  list: ''
}

const mutations = {

  putList: (state, data) => {
    state.list = data
  }

}

const actions = {
  'FETCH_GET_LIST': async({
    commit
  }, page) => {
    const res = await defaul(page)
    console.log(res.data.data)
    commit('putList', res.data)
    // commit('page', res.data.page)
  }
}

export default {
  namespaced: true,
  state,
  mutations,
  actions
}
